<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>半价汇</title>
<meta content="衣服 美妆 包包 配饰 母婴 打折 5折" name="keywords" />
<meta content="每日帮您挑选淘宝最优质商家的促销活动。淘，每日从这里开始！" name="description" />
<link href="static/index/css/style.css" rel="stylesheet" type="text/css" />
<link href="static/index/css/div.css" rel="stylesheet" type="text/css" />
<script src="./static/js/jquery.min.js" type="text/javascript"></script> 
<script src="http://a.tbcdn.cn/apps/stargate/ac/js/proxy.js?t=<?php echo date("U"); ?>"></script>
</head>
<style>
.shop_tag {
	float:left;
}
.shop_tag  a{
    background: url("static/index/images/bjh_tag_bg.jpg") no-repeat scroll right top transparent;
    color: #858585;
    display: block;
    float: left;
    height: 20px;
    line-height: 20px;
    margin: 5px 0 5px 5px;
    padding-right: 10px;
}
</style>
<body tracingsrc="bjh.jpg" tracingopacity="49">
<div class="wrap">
	<div class="top">
		<div class="wbjgz"><a href="#"><img src="/static/index/images/wbjgz.jpg"/></a></div>
	</div>
	<div class="nav">
		<?php if($_SESSION['visitor_nick']) { ?><div class="mybjh"><a href="#"><!--我的半价汇--><?php echo $_SESSION['visitor_nick'];?></a></div><?php } ?>
		<ul class="nav_f"><li class="seltab"><a href="">首页</a></li></ul>
		<div class="ul_s_box">
			<a href="<?php echo spUrl('main', 'index');?>" <?php if($today != 'on' && $catid==0) { ?>class="seltab"<?php } ?> >全部(<?php echo $total; ?>)</a><a href="<?php echo spUrl('main', 'index', array('today'=>'on'));?>" <?php if($today == 'on') {?>class="seltab"<?php } ?>>今日活动(<?php echo $today_total; ?>)</a><?php  foreach($arr_cat_num as $k=>$v) {?><a href="<?php echo spUrl('main', 'index', array('catid'=>$v['catid']));?>" <?php if($catid == $v['catid']) {?>class="seltab"<?php } ?>><?php echo $v['title']; ?>(<?php echo $v['nums']; ?>)</a><?php } ?>
		</div>
	</div>
</div>
<div class="wrap">
	<div class="p10">
		<div class="w700 fl">
			<?php $today_date =  date('Y-m-d', time()); ?>
			<?php foreach($results as $k=>$v) { ?>
			<div class="list_box">
				<?php if($v['startdate'] == $today_date) {?><div style="height:0px;position:relative;"><label class="newtag pngfix" style="position:absolute;"><a href="<?php echo spUrl('click', 'go', array('pid'=>$v[pid])); ?>" hidefocus="true" rel="nofollow" target="_blank" >今日新单</a></label></div><div style="position:absolute;"></div><?php } ?>
				<h2><a href="<?php echo spUrl('click', 'go', array('pid'=>$v[pid])); ?>" target="_blank" ><?php echo $v['title']; ?></a></h2>
				<div class="pic"><a href="<?php echo spUrl('click', 'go', array('pid'=>$v[pid])); ?>" target="_blank" rel="nofollow" ><img src="/uploadfiles/<?php echo $v[thumb]; ?>"/></a></div>
				<div class="info clearfix">
					<div class="shop_tag"><a href="#"><em></em><?php if($v['store_detail']['cid']) { echo $arr_cid[$v['store_detail']['cid']]; } else {echo '淘宝';}?></a></div>
					<div class="lasttime" style="display:none;"><?php echo $v[enddate]; ?></div>
					<div class="l_time"><?php echo $v[enddate]; ?></div>
					
					<div class="look"><a href="<?php echo spUrl('click', 'go', array('pid'=>$v[pid])); ?>" rel="nofollow" target="_blank" ><img src="/static/index/images/btn_look.jpg" /></a></div>
				</div>
			</div>
			<?php } ?>
			<div class="h_10"></div>
			<div class="pagination">
				<div class="page-bottom">
				<span><a href="#">回到顶部</a></span>
				<!-- <span class="page-start"><span>上一页</span></span>
				<span class="page-cur">1</span>
				<a href="#">2</a>
				<a href="#">3</a>
				<a href="#">4</a>
				<a href="#">5</a>
				<span class="page-break">...</span>
				<a class="page-next" href="#"><span>下一页</span></a>
				<span class="page-skip">
				共15页，到第<input type="text" value="1" size="3" id="pageJumpto" name="jumpto">页<button type="button" id="B_pageJump">确定</button>
				</span> -->
				<?php if($pager[current_page] == $pager[first_page]) {?>
				<span class="page-start"><span><b class="icon"></b>上一页</span></span>
				<?php } else { ?>
				<a href="<?php echo spUrl('main', $a, array('page'=>$pager[prev_page], 'catid'=>$catid, 'today'=>$today)); ?>" class="page-prev"><b class="icon"></b>上一页</a>
				<?php } ?>
				<?php foreach($pager[all_pages] as $thepage) {?>
				<?php if($thepage == $pager[current_page]) {?>
				<span class="page-cur"><?php echo $thepage; ?></span>
				<?php } else { ?>
				<a href="<?php echo spUrl('main', $a,  array('page'=>$thepage, 'catid'=>$catid, 'today'=>$today)); ?>"><?php echo $thepage; ?></a>
				<?php }} ?>
				<?php if($pager[current_page] == $pager[last_page]) {?>
				<span class="page-end"><b class="icon"></b>下一页</span>
				<?php } else { ?>
				<a href="<?php echo spUrl('main', $a, array('page'=>$pager[next_page], 'catid'=>$catid, 'today'=>$today)); ?>" class="page-next">下一页<b class="icon"></b></a>
				<?php } ?>
				</div>
			</div>
		</div>
		<div class="w215 fr">
			<!-- <div class="box_bl">
				<div class="clearfix"><h2>我关注的店铺</h2><span><a href="#" class="mang">管理</a></span></div>
				<div class="shop_link clearfix">
					<a href="#">马克华菲</a> <a href="#">迪奥</a> <a href="#">韩度</a> <a href="#">夏士莲</a><a href="#">马克华菲</a> <a href="#">迪奥</a> <a href="#">韩度</a> <a href="#">夏士莲</a>
				</div>
			</div>
			<div class="box_bl">
				<div class="clearfix"><h2>你可能需要</h2></div>
				<div class="shop_tag clearfix">
					<a href="#"><em></em>马克华菲</a> <a href="#"><em></em>迪奥</a> <a href="#"><em></em>韩度</a> <a href="#"><em></em>夏士莲</a><a href="#"><em></em>马克华菲</a> <a href="#"><em></em>迪奥</a> <a href="#"><em></em>韩度</a> <a href="#"><em></em>夏士莲</a>
				</div>
			</div>
			<div class="box_bl">
				<div class="clearfix"><h2>今日淘店铺</h2><div class="tj_ico"><img src="images/bjh_tj.jpg"/></div></div>
				<div class="p10 center">
					<a href="#"><img src="images/p3.jpg" width="182" height="108" /></a>
				</div>
			</div>--> 
			<div id="premium_box" class="box_bl" >
				<?php include 'tags/index_premium.html' ?>
			</div>
			<!-- <div class="box_bl">
				<div class="clearfix"><h2>好东西大家分享</h2></div>
				<div class="p10 center">
					<div class="c_gray6 gao170"><span>发现好的店铺活动？快告诉小汇</span></div>
					<div class="pt10"><input name="" type="button" value="告诉大家" class="btn_gs" /></div>
				</div>
			</div> -->
			 <div class="box_bl">
				<div class="clearfix"><h2>参与投票</h2></div>
				<iframe width="100%" height="554"   frameborder="0" scrolling="no" src="http://vote.weibo.com/widget?vid=1585452&skin=1&isCustom=0&height=554&isAuto=1&pad=10&isResult=1"></iframe>
				<!--<div class="p10">
					<div class="user clearfix">
						<div class="fl"><img src="images/p5.jpg" width="49" height="49" /></div>
						<p class="fr">兔兔犟：我参加了投票投给“C.居家，D.零食”</p>
					</div>
					<div class="c_gray6 gao200">
						<b class="c_gray3">《半价汇第3期商家满意度调查》</b><br />
						<span>1000人参与 | 多选</span><br />
						<span class="pl10 gao250"><img src="images/dc_ico.jpg" />&nbsp;我最喜欢的淘宝商家类目是？</span><br />
						<span class="tpts">投票后才能查看结果</span>
						<div>
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="30" height="30" align="center"><input name="" type="checkbox" value="" /></td>
									<td>A.南芬地方</td>
								</tr>
								<tr>
									<td width="30" height="30" align="center"><input name="" type="checkbox" value="" /></td>
									<td>A.南芬地方</td>
								</tr>
								<tr>
									<td width="30" height="30" align="center"><input name="" type="checkbox" value="" /></td>
									<td>A.南芬地方</td>
								</tr>
								<tr>
									<td width="30" height="30" align="center"><input name="" type="checkbox" value="" /></td>
									<td>A.南芬地方</td>
								</tr>
								<tr>
									<td width="30" height="30" align="center"><input name="" type="checkbox" value="" /></td>
									<td>A.南芬地方</td>
								</tr>
							</table>

						</div>
					</div>
					<div class="pt10"><input name="" type="button" value="投票" class="btn_tp" />&nbsp;<input name="" type="checkbox" value="" />匿名&nbsp;<input name="" type="checkbox" value="" />转发微博</div>
				</div>-->
			</div> 
		</div>
		<div class="h_1"></div>
	</div>
</div>
<!--[if IE 6]>
<script src="./static/js/DD_belatedPNG.js"></script>
<script>
  DD_belatedPNG.fix('.pngfix');
</script>
<![endif]--> 
<div style="display:none;"><script type="text/javascript" src="http://js.tongji.linezing.com/2746546/tongji.js"></script><noscript><a href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/2746546/tongji.gif"/></a></noscript></div>
</body>
<script type="text/javascript">
$().ready(function(){
	countdown();
	setTimeout(countdown,60000);
	$('title').html($('title').html() + ' - 世界因你而美丽');
	crossFrame.init();
})

function countdown() {
	$('.lasttime').each(function(k, v) {
		var Today=new Date();
		var str = '剩余活动时间：' + "<br />";
		var arr_date = $(this).html().split('-');
		var HDday = new Date(arr_date[0], arr_date[1]-1, arr_date[2], '24');
		var DayTime = (HDday.getTime()-Today.getTime())/ 1000 / 60 / 60 /24;
		var days = parseInt(DayTime);//天
		if(days > 0) {
			str += days + '天';
		}
		var HourTime =(DayTime - days)*24;
		var hours =parseInt(HourTime);//时
		if(hours > 0) {
			str += hours + '小时';
		} 
		var MinutesTime =(HourTime-hours)*60;
		var minutes = parseInt(MinutesTime);//分
		if(minutes > 0) {
			str += minutes + '分钟';
		}
		$(this).next().html(str);		
	});
}
</script>
<?php if($_COOKIE['taobao_visitor_id'] && !spAccess('r',  'collect_user_' . $_SESSION['visitor_id'])) { ?>
<script type="text/javascript">
$().ready(function(){
	$.get("<?php echo spUrl('collect', 'collect_user'); ?>");
})
</script>
<?php } ?>
</html>
